home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Workspace / Launch1.3 / Launch.app / Launch.nib (.txt) < prev    next >
NeXT TypedStream Data  |  1995-06-12  |  11KB  |  226 lines

  1. typedstream
  2. StreamTable
  3.     HashTable
  4. Object
  5. [20c]
  6. typedstream
  7. [767c]
  8. typedstream
  9.     HashTable
  10. Object
  11. HeaderClass
  12. %%%%i@@
  13. genericobject_nib
  14. executeItem
  15. prefsPanel
  16. onautoSwitch
  17. logoutSwitch
  18. openItem
  19. openLogin:
  20. openLogout:
  21. executeLogout:
  22. executeLogin:
  23. okPrefs:
  24. showPrefs:
  25. testLogout:
  26. FirstResponder
  27. firstnib
  28. checkSpelling:
  29. alignSelCenter:
  30.     unscript:
  31. pasteFont:
  32. runPageLayout:
  33. superscript:
  34. copyRuler:
  35.     copyFont:
  36. selectAll:
  37. pasteRuler:
  38. toggleRuler:
  39. showGuessPanel:
  40. alignSelLeft:
  41. paste:
  42. performClose:
  43. arrangeInFront:
  44. subscript:
  45. copy:
  46. alignSelRight:
  47. delete:
  48. orderFrontColorPanel:
  49. underline:
  50. performMiniaturize:
  51. [10576c]
  52. typedstream
  53.     HashTable
  54. Object
  55. NibData
  56. @@@@s
  57. Storage
  58. {*@@}
  59.     [47{*@@}]
  60. File's Owner
  61. CustomObject
  62. Application
  63. MainMenu
  64. MenuTemplate
  65. *@*@ccc
  66. Launch
  67. Matrix
  68. Control
  69.     Responder
  70. @:@iiii
  71. MenuCell
  72. ButtonCell
  73. ActionCell
  74.     Helvetica
  75. Info Panel...
  76. Help...
  77. Preferences...
  78. ff@@#::s
  79. submenuAction:
  80. Bitmap
  81.     menuArrow
  82. Scripts
  83. Execute Login Script
  84. Execute Logout Script
  85. Open Login Script
  86. Open Logout Script
  87. Example Login Script
  88. Example Logout Script
  89. Select All
  90. Services
  91. MenuItem
  92. WindowTemplate
  93. iiii***@s@
  94. Panel
  95.     TextField
  96. TextFieldCell
  97. Version 1.3, January 1994
  98. *by S. Fitzpatrick, Q.U.B.
  99. sfitzp@qub.ac.uk
  100. Button
  101. NXImage
  102. :Copyright 1994, S.Fitzpatrick & QUB.  All Rights Reserved.
  103.  Workspace login and logout hooks
  104. Button1
  105. Field1
  106. Field2
  107. VersionNumber
  108. Field
  109. Field3$
  110. MainInstance
  111. Preferences
  112. Execute ~/.Launch and quit
  113. NXradio
  114. NXradioH
  115. Execute ~/.Launch and stay
  116. 'Ask whether or not to execute ~/.Launch
  117. Set up interface as normal
  118. Radio
  119. Action on being auto-launched
  120. Execute ~/.Logout
  121. 'Ask whether or not to execute ~/.Logout
  122. Logout as normal
  123. Logout action
  124. Q2bUQ
  125. Panel1
  126. ScrollView
  127. ClipView
  128. ciifffcfffs
  129. [2425c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
  130. \margl40
  131. \margr40
  132. {\colortbl\red0\green0\blue0;}
  133. \pard\tx560\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ul0\fs24 Launch
  134. \b0  is an application that allows you to initialize and clean up your workspace when you log in/out: when Launch is auto-launched, it executes the script ~/.Launch; when you logout, Launch executes the script ~/.Logout. \
  135. Actually, you can set Launch's auto-launch/logout behaviour in the preferences panel; I think the options are self-explanatory. Note that if Launch is started from the Workspace (i.e. it isn't auto-launched) it will set up it's interface like any normal application. Also, quitting Launch (using the Quit menu item) does not activate the logout hook.\
  136. Launch can be used to, for example:\
  137.     launch applications that you would usually startup when you log in (but that you don't need to have in the dock);\
  138.     place an image in the background when you log in;\
  139.     play a login/logout sound.\
  140. See the example scripts (the menu items under Scripts).\
  141. I'm not really sure if there is a need for Launch now with the various dock-extenders, but it's free so you can't complain. This particular version was inspired by someone asking for a means to set up a user definable logout hook.\
  142. To install Launch:\
  143.     place Launch in the dock;\
  144.     set it to auto-launch using the Workspace Manager's preference panel;\
  145.     create the scripts ~/.Launch and ~/.Logout;\
  146.     ensure the scripts are executable and begin with the line\
  147.         #!/bin/csh\
  148.     (I assume any shell could be used, but I haven't tried that).\
  149. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320 There are menu items to open the scripts in Edit and to execute the scripts (e.g. for testing).\
  150. Launch is free: further distribution is permitted on a non-profit basis. 
  151. \fc0 All the usual disclaimers apply: this application is provided in good faith and in the hope that it will be useful, but absolutely no guarantee is given as to its suitability or otherwise for any purpose; under no cicumstance will I or the Queen's University of Belfast be held responsible for anything resulting from the use of or the inability to use this application, the source code, or any part thereof.\
  152. Share and Enjoy.\
  153. \qc Stephen Fitzpatrick\
  154. Department of Computer Science\
  155. The Queen's University of Belfast\
  156. sfitzp@cs.qub.ac.uk (NeXT mail)
  157. NXCursor
  158. NXibeam
  159. Scroller
  160. _doScroller:
  161. @@@ffs
  162. ScrollingTextsm
  163. Panel2
  164. [1997c]{\rtf0\ansi{\fonttbl\f1\fmodern Courier;\f0\fswiss Helvetica;}
  165. \margl40
  166. \margr40
  167. {\colortbl\red0\green0\blue0;}
  168. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f1\b0\i0\ul0\fs24\fc0 #!/bin/csh\
  169. echo Logging in > /dev/console\
  170. # Play a sound\
  171. sndplay /LocalLibrary/Sounds/login.snd\
  172. # Start some applications\
  173. open /LocalApps/Console\
  174. # 4 performance monitors, one each for CPU, disk, memory and network\
  175. /LocalApps/KPerfMon.app/KPerfMon -InfoType 0  &\
  176. /LocalApps/KPerfMon.app/KPerfMon -InfoType 1  &\
  177. /LocalApps/KPerfMon.app/KPerfMon -InfoType 2  &\
  178. /LocalApps/KPerfMon.app/KPerfMon -InfoType 3  &\
  179. # Check most recent logins before this login\
  180. echo Last 5 logins > /dev/console\
  181. last -10 | sed -e '1,/console/d' | head -5 > /dev/console\
  182. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 \
  183. # Display an image. A more useful variant would select a random image\
  184. # from a list.\
  185. Alert "Background Image?" Yes No\
  186. if ($status == 0) background /LocalLibrary/Backgrounds/Leather.tiff\
  187. \f0 \
  188. Some notes:\
  189.     The open command can be used to launch applications. One advantage of using open is that you don't have to specify a full pathname; the Workspace will search its normal applications path for the applicaton.\
  190.     If the application is part of a package (i.e. a .app file), then, on a 2.1 system, you should open the executable within the package (e.g. Foo.app/Foo). I don't think this is necessary under 3.0.\
  191.     You can't pass arguments to an application using open. You can Launch an application using its pathname and set defaults using the standard NeXT method (see the KPerfMon example).\
  192.     The Console and KPerfMon applications and the backgound and Alert commands are NOT supplied with Launch; they should be available from your usual software source. (I believe they're all free.) (And don't ask where you can get Leather.tiff!)\
  193.     The sndplay command comes with Motorola NeXTs; I don't know if it comes with Intel NeXTs.
  194. Panel3
  195. [624c]{\rtf0\ansi{\fonttbl\f1\fmodern Courier;\f0\fswiss Helvetica;}
  196. \margl40
  197. \margr40
  198. {\colortbl\red0\green0\blue0;}
  199. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f1\b0\i0\ul0\fs24\fc0 #!/bin/csh\
  200. echo Logging out > /dev/console\
  201. # Play a sound\
  202. sndplay /LocalLibrary/Sounds/logout.snd\
  203. # Remove the background image\
  204. set p = (`ps auxww | grep background | grep -v grep | awk '\{print $2\}'`)\
  205. if ("$p" != "") kill -HUP $p\
  206. # This process is left behind by the Console application\
  207. set p = (`ps uxww | grep /usr/ucb/tail | grep -v grep | awk '\{print $2\}'`)\
  208. if ("$p" != "") kill -KILL $p\
  209. {i*@@@}
  210. [18{i*@@@}]
  211. hide:
  212. terminate:
  213. delegate
  214. makeKeyAndOrderFront:
  215. okPrefs:N/
  216. showPrefs:
  217. onautoSwitch/<
  218. prefsPanel/2
  219. copy:
  220. selectAll:
  221. logoutSwitch/U
  222. executeLogin:
  223. executeLogout:
  224. openLogin:
  225. openLogout:
  226.